import { App } from 'vue'
import { createPinia } from 'pinia'
// 数据持久化 防止刷新浏览器数据丢失
import { createPersistedState } from 'pinia-plugin-persistedstate'

const piniaPersistedstate = createPersistedState()
const piniaStore = createPinia()
piniaStore.use(piniaPersistedstate)

export default function useVuePinia(app: App) {
  app.use(piniaStore)
}
